<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
function Queue(){
    this.items=[]
    Queue.prototype.enqueue=function(element){
this.items.push(element)
    }
    Queue.prototype.dequeue=function(){
        return this.items.shift()
    }
    Queue.prototype.front=function(){
        return this.items[0]
    }

}

var queue =new Queue()

queue.enqueue('huid')
queue.enqueue('hufd')
queue.enqueue('hfuid')
queue.enqueue('hudid')
console.log(queue);

queue.dequeue()
console.log(queue);
queue.dequeue()
console.log(queue);

console.log(queue.front());







    </script>
</body>
</html>